function trans(value) {
    if (value === '' || value === null) {
        value = 0
    }
    if (value < 0) {
        value = Math.abs(value)
    }
    // 万
    let tenThousand = Math.pow(10, 4)
    // 亿
    let hundredMillion = Math.pow(10, 8)
    // 万亿
    let trillion = Math.pow(10, 12)
    let temp = 0
    if (value < tenThousand) {
        temp = value.toString()
    } else if (value < hundredMillion && value >= tenThousand) {
        temp = judge(value, tenThousand) + ' 万'
    } else if (value < trillion && value >= hundredMillion) {
        temp = judge(value, hundredMillion) + ' 亿'
    } else if (value >= trillion) {
        temp = judge(value, trillion) + ' 万亿'
    } else (
        temp = '数量过大，数字溢出'
    )
    return temp;
}

function judge(value, unit) {
    let floatValue = parseFloat(value)
    floatValue = floatValue / unit
    return floatValue.toFixed(2)
}

